from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from goods import views

urlpatterns = [
    url(r'^categories/(?P<pk>\d+)/$', views.CategoriesView.as_view()),
    url(r'^categories/(?P<pk>\d+)/skus/$', views.CategoriesListView.as_view()),
    url(r'^browse_histories/$', views.SKUHistoryView.as_view()),
    url(r'^skus/(?P<pk>\d+)/comments/$', views.CommentsListView.as_view()),
    url(r'^orders/(?P<order_id>\d+)/uncommentgoods/$', views.UncommentsView.as_view()),
    url(r'^orders/(?P<order_id>\d+)/comments/$', views.CommentsView.as_view()),
    # orders/20181130223602000003/uncommentgoods/
]

router = DefaultRouter()
router.register('skus/search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls
